package com.hms.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hms.dao.IBaseDao;
import com.hms.dao.ICommonDataDao;
import com.hms.entity.TdCommonData;
import com.hms.entity.TdCommonData.CommonDataType;
import com.hms.service.ICommonDataService;

/**
 * 标题、简要说明. <br>
 * 类详细说明.
 * <p>
 * Copyright: Copyright (c) 2013-4-14 下午2:45:23
 * <p>
 * Company: 北京宽连十方数字技术有限公司
 * <p>
 * 
 * @author wangpz@c-platform.com
 * @version 1.0.0
 */
@Service
public class CommonDataService extends BaseService<TdCommonData, String> implements ICommonDataService {

	@Resource(name = "commonDataDao")
	private ICommonDataDao commonDataDao;

	@Override
	public List<TdCommonData> getAllCustomerType() {
		return commonDataDao.getCommonDataByType(CommonDataType.customerType);
	}

	@Override
	public List<TdCommonData> getAllRunBalance() {
		return commonDataDao.getCommonDataByType(CommonDataType.runBalance);
	}

	@Override
	public String save(TdCommonData entity) {
		return super.save(entity);
	}

	@Override
	public IBaseDao<TdCommonData, String> getDao() {
		return commonDataDao;
	}
}
